<script>
  var unit, room;                   // 声明变量
  unit = 3;                         // 为变量赋值
  room = 1001;                      // 为变量赋值
  var fname = 'Tom', age = 12;      // 声明变量的同时赋值
</script>

<script>
  flag = false;                     // 为变量flag赋值false
  a = 1, b = 2;                      // 为变量a和b分别赋值为1和2
</script>

<script>
  var r = 6;
  const PI = 3.14;
  const P = 2 * PI * r;
  console.log('P=' + P);            // 输出结果：P=37.68
</script>